package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.KingProcureRefundMaterialDetailSerialMapper;
import com.ly.heart.service.IKingProcureRefundMaterialDetailSerialService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingProcureRefundMaterialDetailSerialEntity;

import javax.annotation.Resource;

/**
 * 金蝶-采购退料单明细序列号Service业务层处理
 *
 * @author cxl
 * @date 2024-07-16
 */
@Service
public class KingProcureRefundMaterialDetailSerialServiceImpl extends ServiceImpl<KingProcureRefundMaterialDetailSerialMapper,KingProcureRefundMaterialDetailSerialEntity> implements IKingProcureRefundMaterialDetailSerialService {

    @Resource
    private KingProcureRefundMaterialDetailSerialMapper kingProcureRefundMaterialDetailSerialMapper;

    /**
     * 查询金蝶-采购退料单明细序列号
     *
     * @param id 金蝶-采购退料单明细序列号ID
     * @return 金蝶-采购退料单明细序列号
     */
    @Override
    public KingProcureRefundMaterialDetailSerialEntity selectKingProcureRefundMaterialDetailSerialEntityById(String id)
    {
        return kingProcureRefundMaterialDetailSerialMapper.selectKingProcureRefundMaterialDetailSerialEntityById(id);
    }

    /**
     * 查询金蝶-采购退料单明细序列号列表
     *
     * @param kingProcureRefundMaterialDetailSerialEntity 金蝶-采购退料单明细序列号
     * @return 金蝶-采购退料单明细序列号
     */
    @Override
    public List<KingProcureRefundMaterialDetailSerialEntity> selectKingProcureRefundMaterialDetailSerialEntityList(KingProcureRefundMaterialDetailSerialEntity kingProcureRefundMaterialDetailSerialEntity)
    {
        return kingProcureRefundMaterialDetailSerialMapper.selectKingProcureRefundMaterialDetailSerialEntityList(kingProcureRefundMaterialDetailSerialEntity);
    }

    /**
     * 新增金蝶-采购退料单明细序列号
     *
     * @param kingProcureRefundMaterialDetailSerialEntity 金蝶-采购退料单明细序列号
     * @return 结果
     */
    @Override
    public int insertKingProcureRefundMaterialDetailSerialEntity(KingProcureRefundMaterialDetailSerialEntity kingProcureRefundMaterialDetailSerialEntity)
    {
        kingProcureRefundMaterialDetailSerialEntity.setCreateTime(DateUtils.getNowDate());
        return kingProcureRefundMaterialDetailSerialMapper.insertKingProcureRefundMaterialDetailSerialEntity(kingProcureRefundMaterialDetailSerialEntity);
    }

    /**
     * 修改金蝶-采购退料单明细序列号
     *
     * @param kingProcureRefundMaterialDetailSerialEntity 金蝶-采购退料单明细序列号
     * @return 结果
     */
    @Override
    public int updateKingProcureRefundMaterialDetailSerialEntity(KingProcureRefundMaterialDetailSerialEntity kingProcureRefundMaterialDetailSerialEntity)
    {
        kingProcureRefundMaterialDetailSerialEntity.setUpdateTime(DateUtils.getNowDate());
        return kingProcureRefundMaterialDetailSerialMapper.updateKingProcureRefundMaterialDetailSerialEntity(kingProcureRefundMaterialDetailSerialEntity);
    }

    /**
     * 批量删除金蝶-采购退料单明细序列号
     *
     * @param ids 需要删除的金蝶-采购退料单明细序列号ID
     * @return 结果
     */
    @Override
    public int deleteKingProcureRefundMaterialDetailSerialEntityByIds(String[] ids)
    {
        return kingProcureRefundMaterialDetailSerialMapper.deleteKingProcureRefundMaterialDetailSerialEntityByIds(ids);
    }

    /**
     * 删除金蝶-采购退料单明细序列号信息
     *
     * @param id 金蝶-采购退料单明细序列号ID
     * @return 结果
     */
    @Override
    public int deleteKingProcureRefundMaterialDetailSerialEntityById(String id)
    {
        return kingProcureRefundMaterialDetailSerialMapper.deleteKingProcureRefundMaterialDetailSerialEntityById(id);
    }
}
